package com.guigu.qingcheng.service;

import com.guigu.common_util.pojo.utils.Result;
import com.guigu.qingcheng.entity.Goods;
import com.guigu.qingcheng.entity.TbCategory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Component
@FeignClient("service-goods")
public interface GoodsServiceFeign {

    @GetMapping("/servicegoods/category/findCategoryTree")
    public List<Map> findCategoryTree();

    @GetMapping("/servicegoods/tbspu/findGoodsById")
    public Goods findGoodsById(@RequestParam("id") String id);

    @GetMapping("/servicegoods/category/findById2")
    public TbCategory findById2(@RequestParam("id")Integer id);

    @GetMapping("/servicegoods/tbsku/search")
    public Map search(@RequestParam Map<String,String> searchMap);

    @GetMapping("/servicegoods/tbsku/findByIdPrice")
    public Result findByIdPrice(@RequestParam("skuId") String skuId);
}
